package com.mtsmda.designPattern1.creational.abstract_factory;

public class FactoryProducer {

	public static AbstractFactory getFactory(FactoryType factoryType) {
		if (factoryType.equals(FactoryType.CONTINENT)) {
			return new ContinentFactory();
		} else if (factoryType.equals(FactoryType.COUNTRY)) {
			return new CountryFactory();
		}
		return null;
	}

	public enum FactoryType {
		CONTINENT, COUNTRY
	}

}